<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::post('fbwnotify/alinotify','Business\App\Wallet\RechargeNotifyController@alipayNotify');//支付宝回调
Route::post('fbwnotify/wechatnotify','Business\App\Wallet\RechargeNotifyController@wechatNotify');//微信回调
Route::post('fbwnotify/allinpaynotify','Business\App\Wallet\RechargeNotifyController@allinpayNotify');//微信回调
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::get('home','HomeController@index');//测试用，勿删
Route::get('home1','HomeController@index1');//测试用，勿删
if(env('WEB_URL')=='https://test2.fbw-china.com/') {
    $pcroute = ['domain'=>'test2.fbw-china.com'];
    $mobileroute = ['domain'=>'test2.fbw-china.com','middleware' => 'web'];
    $shopwebroute = ['domain'=>'test2.fbw-china.com','middleware' => 'shopweb'];
    $consoleroute = ['domain'=>'admin.fbw-china.com','middleware'=>'adminweb'];
    $GLOBALS['userapi'] = ['domain' => 'apitest.fbw-china.com','prefix' => 'user','namespace'=>'App\Http\Controllers\Api\V2','middleware'=>'cors'];
    $GLOBALS['shopapi'] = ['domain' => 'apitest.fbw-china.com','prefix' => 'shop','namespace'=>'App\Http\Controllers\ShopApi\V1','middleware'=>'cors'];
}
elseif(env('WEB_URL')=='https://www.fbw-china.com/') {
    $pcroute = ['domain'=>'www.fbw-china.com'];
    $mobileroute = ['domain'=>'www.fbw-china.com','middleware' => 'web'];
    $shopwebroute = ['domain'=>'www.fbw-china.com','middleware' => 'shopweb'];
    $consoleroute = ['domain'=>'console.fbw-china.com','middleware'=>'adminweb'];
    $GLOBALS['userapi'] = ['domain' => 'api.fbw-china.com','prefix' => 'user','namespace'=>'App\Http\Controllers\Api\V2','middleware'=>'cors'];
    $GLOBALS['shopapi'] = ['domain' => 'api.fbw-china.com','prefix' => 'shop','namespace'=>'App\Http\Controllers\ShopApi\V1','middleware'=>'cors'];
}
elseif(env('WEB_URL') == 'https://wwwrelease.fbw-china.com/') {
    $pcroute = [];
    $mobileroute = ['middleware' => 'web'];
    $shopwebroute = ['middleware' => 'shopweb'];
    $consoleroute = ['middleware'=>'adminweb'];
    $GLOBALS['userapi'] = ['prefix' => 'user','namespace'=>'App\Http\Controllers\Api\V2','middleware'=>'cors'];
    $GLOBALS['shopapi'] = ['prefix' => 'shop','namespace'=>'App\Http\Controllers\ShopApi\V1','middleware'=>'cors'];
}
elseif(env('WEB_URL') == 'http://leichu.wang:8150/') {
    $pcroute = [];
    $mobileroute = ['middleware' => 'web'];
    $shopwebroute = ['middleware' => 'shopweb'];
    $consoleroute = ['middleware'=>'adminweb'];
    $GLOBALS['userapi'] = ['prefix' => 'user','namespace'=>'App\Http\Controllers\Api\V2','middleware'=>'cors'];
    $GLOBALS['shopapi'] = ['prefix' => 'shop','namespace'=>'App\Http\Controllers\ShopApi\V1','middleware'=>'cors'];
}
elseif(env('WEB_URL') == 'http://leichu.wang:8250/') {
    $pcroute = [];
    $mobileroute = ['middleware' => 'web'];
    $shopwebroute = ['middleware' => 'shopweb'];
    $consoleroute = ['middleware'=>'adminweb'];
    $GLOBALS['userapi'] = ['prefix' => 'user','namespace'=>'App\Http\Controllers\Api\V2','middleware'=>'cors'];
    $GLOBALS['shopapi'] = ['prefix' => 'shop','namespace'=>'App\Http\Controllers\ShopApi\V1','middleware'=>'cors'];
}
elseif(env('WEB_URL') == 'wenfeng.com:8088/') {
    $pcroute = [];
    $mobileroute = ['middleware' => 'web'];
    $shopwebroute = ['middleware' => 'shopweb'];
    $consoleroute = ['middleware'=>'adminweb'];
    $GLOBALS['userapi'] = ['prefix' => 'user','namespace'=>'App\Http\Controllers\Api\V2','middleware'=>'cors'];
    $GLOBALS['shopapi'] = ['prefix' => 'shop','namespace'=>'App\Http\Controllers\ShopApi\V1','middleware'=>'cors'];
}
else
{
    exit;
}
//pc端用户版路由
Route::group($pcroute, function () {
    Route::get('/', 'PcWeb\IndexController@index');
    Route::get('index', 'PcWeb\IndexController@index');
    Route::get('shopjoin', 'PcWeb\IndexController@shopJoin');
    Route::post('submitshopjoin', 'PcWeb\IndexController@submitShopJoin');
    Route::get('aboutus', 'PcWeb\IndexController@aboutUs');
    Route::get('cityagent', 'PcWeb\IndexController@cityAgent');
    Route::get('recruit', 'PcWeb\IndexController@recruit');
});
//手机端用户版路由
Route::group($mobileroute, function () {
    //不需要认证的页面
    Route::get('banner/test','MobileWeb\IndexController@bannerTest');//测试用，勿删
    Route::get('mobile/index','MobileWeb\IndexController@index');
    Route::get('mobile/today','MobileWeb\IndexController@today');
    Route::get('mobile/position','MobileWeb\IndexController@position');
    Route::get('mobile/lngandlat/get','MobileWeb\IndexController@longitudeAndLatitude');
    Route::get('mobile/city/switch','MobileWeb\IndexController@switchCity');
    Route::get('mobile/login','MobileWeb\IndexController@login');
    Route::get('mobile/login/code','MobileWeb\IndexController@loginCode');
    Route::post('mobile/login/submit','MobileWeb\IndexController@submitLoginData');
    Route::get('mobile/logout', 'MobileWeb\IndexController@logout');
    Route::post('mobile/captcha/verify','MobileWeb\IndexController@verifyCaptcha');
    Route::get('mobile/shop/search','MobileWeb\IndexController@searchShop');
    Route::get('mobile/shop/search/result','MobileWeb\IndexController@searchShopResult');
    Route::get('mobile/shop/search/clear','MobileWeb\IndexController@clearSearch');
    Route::get('mobile/shop/get','MobileWeb\IndexController@getShopDetail');
    Route::get('mobile/shop/bigpicture','MobileWeb\IndexController@bigPicture');
    Route::get('mobile/shop/event','MobileWeb\IndexController@shopEvent');
    Route::get('mobile/shop/list', 'MobileWeb\IndexController@shopList');
    Route::get('mobile/shop/comment/list', 'MobileWeb\IndexController@shopCommentList');
    Route::get('mobile/shop/map', 'MobileWeb\IndexController@shopMap');
    Route::get('mobile/next','MobileWeb\IndexController@next');
    Route::get('mobile/night','MobileWeb\IndexController@night');
    Route::get('mobile/mycenter/test','MobileWeb\MyCenterController@test');
    Route::get('mobile/wallet/recharge/apppay','MobileWeb\WalletController@rechargePayByAppWX');
//    Route::auth();
        Route::group(['middleware' => 'auth'], function () {
            //需要认证的页面
            Route::get('mobile/mycenter/index','MobileWeb\MyCenterController@index');
            Route::get('mobile/mycenter/user/get','MobileWeb\MyCenterController@getUserInfo');
            Route::POST('mobile/mycenter/user/save','MobileWeb\MyCenterController@saveUserInfo');
            Route::POST('mobile/mycenter/avatar/save','MobileWeb\MyCenterController@saveAvatar');
            Route::get('mobile/mycenter/more','MobileWeb\MyCenterController@more');
            Route::get('mobile/mycenter/doublecoupon','MobileWeb\MyCenterController@doubleCoupon');
            Route::get('mobile/mycenter/redenvelope','MobileWeb\MyCenterController@redEnvelope');
            Route::get('mobile/mycenter/collection','MobileWeb\MyCenterController@collection');
            Route::get('mobile/mycenter/collection/add','MobileWeb\MyCenterController@addCollection');
            Route::get('mobile/mycenter/collection/delete','MobileWeb\MyCenterController@deleteCollection');
            Route::get('mobile/mycenter/subscription','MobileWeb\MyCenterController@subscription');
            Route::get('mobile/mycenter/subscription/add','MobileWeb\MyCenterController@addSubscription');
            Route::get('mobile/mycenter/subscription/delete','MobileWeb\MyCenterController@deleteSubscription');
            Route::get('mobile/mycenter/account/security','MobileWeb\MyCenterController@accountSecurity');
            Route::get('mobile/mycenter/phone/binding','MobileWeb\MyCenterController@phoneBinding');
            Route::POST('mobile/mycenter/phone/update','MobileWeb\MyCenterController@updatePhone');
            Route::POST('mobile/mycenter/phone/captcha/get','MobileWeb\MyCenterController@getCaptchaForPhoneUpdated');
            Route::POST('mobile/mycenter/phone/captcha/verify','MobileWeb\MyCenterController@verifyCaptchaForPhoneUpdated');
            Route::get('mobile/mycenter/account/auth','MobileWeb\MyCenterController@accountAuth');
            Route::POST('mobile/mycenter/identity/save','MobileWeb\MyCenterController@saveIdentity');
            Route::get('mobile/mycenter/password/index','MobileWeb\MyCenterController@payPassword');
            Route::get('mobile/mycenter/password/set','MobileWeb\MyCenterController@setPayPassword');
            Route::POST('mobile/mycenter/password/verify','MobileWeb\MyCenterController@verifyPayPassword');
            Route::get('mobile/mycenter/password/reset','MobileWeb\MyCenterController@resetPayPassword');
            Route::POST('mobile/mycenter/identity/verify','MobileWeb\MyCenterController@verifyIdentity');
            Route::get('mobile/mycenter/suggestion','MobileWeb\MyCenterController@suggestion');
            Route::POST('mobile/mycenter/suggestion/add','MobileWeb\MyCenterController@addSuggestion');
            Route::get('mobile/wallet/index','MobileWeb\WalletController@index');
            Route::get('mobile/wallet/order/list','MobileWeb\WalletController@orderList');
            Route::get('mobile/wallet/comment','MobileWeb\WalletController@comment');
            Route::POST('mobile/wallet/comment/add','MobileWeb\WalletController@addComment');
            Route::get('mobile/wallet/pay','MobileWeb\WalletController@pay');
            Route::get('mobile/wallet/pay/way','MobileWeb\WalletController@payWay');
            Route::get('mobile/wallet/pay/shopin','MobileWeb\WalletController@payShopIn');
            Route::get('mobile/wallet/pay/redenvelopeamount/get','MobileWeb\WalletController@getRedEnvelopeMaxAmount');
            Route::post('mobile/wallet/pay/shopin/result','MobileWeb\WalletController@payShopInResult');
            Route::get('mobile/wallet/recharge','MobileWeb\WalletController@recharge');
            Route::get('mobile/wallet/recharge/note','MobileWeb\WalletController@rechargeNote');
            Route::get('mobile/wallet/recharge/password','MobileWeb\WalletController@rechargePassword');
            Route::get('mobile/wallet/pay/shopin/password','MobileWeb\WalletController@payShopinPassword');
            Route::get('mobile/wallet/recharge/pay','MobileWeb\WalletController@rechargePay');
            Route::get('mobile/wallet/recharge/startpay','MobileWeb\WalletController@rechargeStartPay');
            Route::get('mobile/wallet/recharge/end','MobileWeb\WalletController@rechargeEnd');
            Route::get('mobile/wallet/recharge/details','MobileWeb\WalletController@rechargeDetails');
            Route::get('mobile/wallet/order/get','MobileWeb\WalletController@orderDetail');
            Route::get('mobile/wallet/pay/end','MobileWeb\WalletController@payEnd');

       });
});

Route::get('mobile/wenfeng/test','MobileWeb\TestController@wenFengTest'); //TODO 文风学习用
Route::get('mobile/huangyanxia/test','MobileWeb\TestController@huangTest'); //TODO 黄艳霞测试

//手机端用户版 h5共享的页面
Route::post('mobile/captcha/get','MobileWeb\IndexController@getCaptcha');
Route::post('mobile/register/captcha/get','MobileWeb\IndexController@getCaptchaAndJudgeRegister');
Route::get('mobile/error/404','MobileWeb\IndexController@error');
Route::get('mobile/app/download','MobileWeb\MyCenterController@download');
Route::get('mobile/mycenter/question','MobileWeb\MyCenterController@question');
Route::get('mobile/mycenter/howpaypassword','MobileWeb\MyCenterController@howPayPassword');
Route::get('mobile/mycenter/Appuse','MobileWeb\MyCenterController@AppUse');
Route::get('mobile/mycenter/Applogin','MobileWeb\MyCenterController@AppLogin');
Route::get('mobile/mycenter/opensubscribe','MobileWeb\MyCenterController@openSubscribe');
Route::get('mobile/mycenter/changemobile','MobileWeb\MyCenterController@changeMobile');
Route::get('mobile/mycenter/userknow','MobileWeb\MyCenterController@userKnow');
Route::get('mobile/mycenter/useragreement','MobileWeb\MyCenterController@userAgreement');
Route::get('mobile/mycenter/agreement','MobileWeb\MyCenterController@agreement');
Route::get('mobile/share/recommend','MobileWeb\CommonController@shareRecommend');
Route::post('mobile/share/recommend/submit','MobileWeb\CommonController@submitRecommend');
Route::get('mobile/share/recharge','MobileWeb\CommonController@shareRecharge');
Route::get('mobile/wallet/course','MobileWeb\CommonController@course');
Route::get('mobile/mycenter/recommend','MobileWeb\MyCenterController@recommend');
Route::get('mobile/mycenter/shop/joinin','MobileWeb\MyCenterController@shopJoinIn');
Route::get('mobile/wallet/newuser/doublecoupon','MobileWeb\WalletController@newUserGetDoubleCoupon');
Route::get('mobile/wallet/doublecoupon/get','MobileWeb\WalletController@getDoubleCoupon');
Route::get('mobile/salesman/gotodownApp','MobileWeb\SalesmanController@goToDownApp');
Route::post('mobile/salesman/waituser/submit','MobileWeb\SalesmanController@submitWaitUserByShop');
Route::post('mobile/salesman/waituserbyuser/submit','MobileWeb\SalesmanController@submitWaitUserByUser');
Route::get('mobile/h5/event/double11','MobileWeb\H5Controller@double11');
Route::get('mobile/h5/event/goodshop','MobileWeb\H5Controller@goodShop');
Route::get('mobile/h5/event/luckyuser','MobileWeb\H5Controller@luckyUser');
Route::get('mobile/h5/event/{name}','MobileWeb\H5Controller@getEventByName');
Route::get('mobile/order/search','MobileWeb\OrderController@searchOrder');
Route::get('mobile/order/search/result','MobileWeb\OrderController@searchOrderResult');

//二维码的页面
Route::get('qrcode/shop/{id}','MobileWeb\QrCodeController@shopQrCode');
Route::get('qrcode/h5/{id}','MobileWeb\QrCodeController@h5QrCode');
Route::get('qrcode/user/{id}','MobileWeb\QrCodeController@userQrCode');

//手机端商家版路由
Route::get('shop/app/download', 'ShopWeb\CommonController@appDownload');
Route::get('shop/mycenter/help', 'ShopWeb\CommonController@help');
Route::get('shop/mycenter/agreement', 'ShopWeb\CommonController@agreement');
Route::get('shop/collectmoney/qrcode', 'ShopWeb\IndexController@collectMoneyQrCode');

Route::group($shopwebroute, function() {
    Route::get('shop/login', 'ShopWeb\IndexController@login');
    Route::get('shop/login/code/get', 'ShopWeb\IndexController@getCode');
    Route::post('shop/login/submit', 'ShopWeb\IndexController@submitLoginData');
    Route::group(['middleware' => 'shopwebauth'], function () {
        //需要登录
        Route::get('shop/index', 'ShopWeb\IndexController@index');
        Route::post('shop/user/password/set', 'ShopWeb\IndexController@setShopUserPassword');
        Route::get('shop/all/getbyuserid', 'ShopWeb\IndexController@getAllShopsByShopUserId');
        Route::get('shop/shopid/select', 'ShopWeb\IndexController@selectShopId');
        Route::get('shop/order/event/chart', 'ShopWeb\IndexController@chartShopLastEventOrderCount');
        Route::get('shop/user/message', 'ShopWeb\IndexController@userMessage');
        Route::post('shop/user/password/update', 'ShopWeb\IndexController@updatePassword');
        Route::get('shop/logout', 'ShopWeb\IndexController@logout');
        Route::get('shop/order/index', 'ShopWeb\OrderController@orderIndex');
        Route::get('shop/order/list', 'ShopWeb\OrderController@orderList');
        Route::get('shop/order/export', 'ShopWeb\OrderController@exportOrderList');
        Route::get('shop/order/details', 'ShopWeb\OrderController@orderDetails');
        Route::get('shop/salesman/register/user/index', 'ShopWeb\SalesmanController@registerUser');
        Route::get('shop/salesman/register/user/list', 'ShopWeb\SalesmanController@registerUserList');
        Route::get('shop/salesman/salesman/order/index', 'ShopWeb\SalesmanController@salesmanOrder');
        Route::get('shop/salesman/salesman/order/list', 'ShopWeb\SalesmanController@salesmanOrderList');
        Route::get('shop/finance/for/payment/order/index', 'ShopWeb\FinanceController@orderForPayment');
        Route::get('shop/finance/for/payment/order/list', 'ShopWeb\FinanceController@orderList');
        Route::get('shop/finance/for/payment/salesman/index', 'ShopWeb\FinanceController@salesmanForPayment');
        Route::get('shop/finance/for/payment/salesman/list', 'ShopWeb\FinanceController@salesmanList');
        Route::get('shop/finance/for/payment/salesman/detail', 'ShopWeb\FinanceController@salesmanForPaymentDetail');
        Route::get('shop/qrcode/shop/qrcode', 'ShopWeb\QrcodeController@shopQrcode');
        Route::get('shop/qrcode/shop/qrcode/download', 'ShopWeb\QrcodeController@downloadShopQrcode');
        Route::get('shop/admin/auth/createorlist', 'ShopWeb\AdminController@getCreateSubAccountAndListManageAuth');
        Route::get('shop/admin/list', 'ShopWeb\AdminController@subAccountList');
        Route::get('shop/admin/account/add/code/get', 'ShopWeb\AdminController@getCodeBeforeAddSubAccount');
        Route::get('shop/admin/account/add', 'ShopWeb\AdminController@addSubAccount');
        Route::get('shop/shopids/getbymobile', 'ShopWeb\AdminController@getShopIdsByMobile');
        Route::post('shop/admin/account/add/submit', 'ShopWeb\AdminController@submitAddSubAccount');
        Route::get('shop/admin/account/get', 'ShopWeb\AdminController@getSubAccount');
        Route::get('shop/admin/account/auth/get', 'ShopWeb\AdminController@getSubAccountAuth');
        Route::get('shop/admin/account/edit', 'ShopWeb\AdminController@editSubAccount');
        Route::post('shop/admin/account/edit/submit', 'ShopWeb\AdminController@submitEditSubAccount');
        Route::post('shop/admin/account/disable', 'ShopWeb\AdminController@disableSubAccount');
    });
});

//后台管理界面
Route::group($consoleroute, function() {
    Route::get('/', 'ConsoleWeb\IndexController@login');
    Route::get('console/login', 'ConsoleWeb\IndexController@login');
    Route::get('console/logout', 'ConsoleWeb\IndexController@logout');
    Route::post('console/login/submit', 'ConsoleWeb\IndexController@submitLoginData');
    Route::get('console/captcha/get', 'ConsoleWeb\IndexController@getCaptcha');
    Route::get('console/password/forget', 'ConsoleWeb\IndexController@forgetPassword');
    Route::post('console/password/forget/submit', 'ConsoleWeb\IndexController@submitForgetPassword');
    Route::post('console/upload/test', 'ConsoleWeb\CommonController@testUpload');
    Route::get('console/upload/photo', 'ConsoleWeb\CommonController@uploadPhoto');
    Route::get('console/lngandlat/get', 'ConsoleWeb\CommonController@getLongitudeAndLatitude');
    Route::get('console/secondclass/get', 'ConsoleWeb\CommonController@getSecondClass');
    Route::get('console/province/get', 'ConsoleWeb\CommonController@getProvince');
    Route::get('console/bank/province', 'ConsoleWeb\CommonController@getBankProvince');
    Route::get('console/bank/city', 'ConsoleWeb\CommonController@getBankCity');
    Route::get('console/area/get', 'ConsoleWeb\CommonController@getArea');
    Route::get('console/shop/code/verify', 'ConsoleWeb\CommonController@verifyShopCode');
    Route::get('console/shop/searchbyname', 'ConsoleWeb\CommonController@searchShopByShopName');
    Route::get('console/bankname/get', 'ConsoleWeb\CommonController@getBankName');
    Route::get('console/user/nickname/get', 'ConsoleWeb\CommonController@getNicknameByMobile');
    Route::get('console/test', 'ConsoleWeb\TestController@test'); //TODO 测试使用，勿删
    Route::group(['middleware' => 'adminauth'], function () {
        Route::get('console/index', 'ConsoleWeb\IndexController@index');
        Route::get('console/adminuser/auth/get', 'ConsoleWeb\IndexController@getAdminUserAuth');
        Route::get('console/auth/city/get', 'ConsoleWeb\IndexController@getAuthCity');
        Route::get('console/city/select', 'ConsoleWeb\IndexController@selectCity');
        Route::get('console/account/info', 'ConsoleWeb\IndexController@accountInformation');
        Route::post('console/password/reset', 'ConsoleWeb\IndexController@resetPassword');
        Route::get('console/admin/account/getbyrole', 'ConsoleWeb\AdminController@getAllByRole');
        Route::get('console/auth/type/valid', 'ConsoleWeb\AdminController@isValidAuthByType');
        Route::get('console/sms/auth/valid', 'ConsoleWeb\AdminController@isSmsValidAuth');
        Route::get('console/sms/get', ['as'=>'smsSelect', 'uses'=>'ConsoleWeb\IndexController@getSmsCode']);
        Route::get('console/admin/account/list', ['as'=>'adminUserManagement', 'uses'=>'ConsoleWeb\AdminController@accountList']);
        Route::get('console/admin/account/get', ['as'=>'adminUserManagement', 'uses'=>'ConsoleWeb\AdminController@getAccount']);
        Route::get('console/admin/account/new', ['as'=>'adminUserManagement:add', 'uses'=>'ConsoleWeb\AdminController@newAccount']);
        Route::post('console/admin/account/add', ['as'=>'adminUserManagement:add', 'uses'=>'ConsoleWeb\AdminController@addAccount']);
        Route::post('console/admin/account/edit', ['as'=>'adminUserManagement:edit', 'uses'=>'ConsoleWeb\AdminController@editAccount']);
        Route::post('console/admin/account/password/update', ['as'=>'adminUserManagement:edit', 'uses'=>'ConsoleWeb\AdminController@updateAccountPassword']);
        Route::post('console/admin/account/mobile/update', ['as'=>'adminUserManagement:edit', 'uses'=>'ConsoleWeb\AdminController@updateAccountMobile']);
        Route::post('console/admin/account/delete', ['as'=>'adminUserManagement:del', 'uses'=>'ConsoleWeb\AdminController@deleteAccount']);
        Route::post('console/admin/account/status/edit', ['as'=>'adminUserManagement:edit', 'uses'=>'ConsoleWeb\AdminController@updateAccountStatus']);
        Route::get('console/admin/account/export', ['as'=>'adminUserManagement:export', 'uses'=>'ConsoleWeb\AdminController@exportAccount']);
        Route::get('console/admin/account/auth/refresh', ['as'=>'adminUserManagement', 'uses'=>'ConsoleWeb\AdminController@refreshAdminUserAuth']);
        Route::get('console/admin/role/management', ['as'=>'adminRoleManagement', 'uses'=>'ConsoleWeb\AdminController@roleManagement']);
        Route::get('console/admin/role/add', ['as'=>'adminRoleManagement:add', 'uses'=>'ConsoleWeb\AdminController@addRole']);
        Route::get('console/admin/role/get', ['as'=>'adminRoleManagement', 'uses'=>'ConsoleWeb\AdminController@getRole']);
        Route::post('console/admin/role/edit', ['as'=>'adminRoleManagement:edit', 'uses'=>'ConsoleWeb\AdminController@editRole']);
        Route::post('console/admin/role/delete', ['as'=>'adminRoleManagement:del', 'uses'=>'ConsoleWeb\AdminController@deleteRole']);
        Route::get('console/admin/agent/list', ['as'=>'adminRoleManagement', 'uses'=>'ConsoleWeb\AdminController@agentList']);
        Route::get('console/admin/agent/add', ['as'=>'adminRoleManagement:add', 'uses'=>'ConsoleWeb\AdminController@addAgent']);
        Route::get('console/admin/agent/get', ['as'=>'adminRoleManagement', 'uses'=>'ConsoleWeb\AdminController@getAgent']);
        Route::post('console/admin/agent/edit', ['as'=>'adminRoleManagement', 'uses'=>'ConsoleWeb\AdminController@editAgent']);
        Route::post('console/admin/agent/delete', ['as'=>'adminRoleManagement', 'uses'=>'ConsoleWeb\AdminController@deleteAgent']);
        Route::get('console/system/area/management', ['as'=>'areaManagement', 'uses'=>'ConsoleWeb\SystemController@areaManagement']);
        Route::get('console/system/area/sublist', ['as'=>'areaManagement', 'uses'=>'ConsoleWeb\SystemController@getAreaSubListByType']);
        Route::get('console/system/integral/rule', ['as'=>'pointManagement', 'uses'=>'ConsoleWeb\SystemController@integralRule']);
        Route::get('console/system/user/agreement', ['as'=>'userAgreement', 'uses'=>'ConsoleWeb\SystemController@userAgreement']);
        Route::get('console/system/business/agreement', ['as'=>'shopAgreement', 'uses'=>'ConsoleWeb\SystemController@businessAgreement']);
        Route::get('console/system/app/version', ['as'=>'appVersion', 'uses'=>'ConsoleWeb\SystemController@appVersion']);
        Route::get('console/system/app/upload', ['as'=>'appVersion', 'uses'=>'ConsoleWeb\SystemController@uploadApp']);
        Route::post('console/system/app/upload/submit', ['as'=>'appVersion', 'uses'=>'ConsoleWeb\SystemController@submitAppUploadData']);
        Route::get('console/system/red/envelope/intercalate', ['as'=>'redEnvelope', 'uses'=>'ConsoleWeb\SystemController@intercalateRedEnvelope']);
        Route::post('console/system/red/envelope/hqratio/update', ['as'=>'redEnvelope:edit', 'uses'=>'ConsoleWeb\SystemController@updateRedEnvelopeHqRatio']);
        Route::get('console/system/red/active/set', ['as'=>'redEnvelope:edit', 'uses'=>'ConsoleWeb\SystemController@createRedActive']);
        Route::get('console/system/red/active/details', ['as'=>'redEnvelope', 'uses'=>'ConsoleWeb\SystemController@redActiveDetails']);
        Route::get('console/system/red/envelope/history','ConsoleWeb\SystemController@redEnvelopeHistoric');
        Route::get('console/user/list', ['as'=>'userManagement', 'uses'=>'ConsoleWeb\UserController@userList']);
        Route::get('console/user/get', ['as'=>'userManagement', 'uses'=>'ConsoleWeb\UserController@getUser']);
        Route::get('console/user/getbytype', 'ConsoleWeb\UserController@getUserInfoByType');
        Route::post('console/user/edit', ['as'=>'userManagement:edit', 'uses'=>'ConsoleWeb\UserController@editUser']);
        Route::post('console/user/status/update', ['as'=>'userManagement:edit', 'uses'=>'ConsoleWeb\UserController@editUserStatus']);
        Route::post('console/user/delete', ['as'=>'userManagement:del', 'uses'=>'ConsoleWeb\UserController@deleteUser']);
        Route::get('console/user/export', ['as'=>'userManagement:export', 'uses'=>'ConsoleWeb\UserController@exportUser']);
        Route::get('console/user/region/list', ['as'=>'userRegion','uses'=>'ConsoleWeb\UserController@regionUserList']);
        Route::get('console/user/region/get', ['as'=>'userRegion','uses'=>'ConsoleWeb\UserController@regionUserDetails']);
        Route::get('console/user/red/envelope', ['as'=>'userRedEnvelope','uses'=>'ConsoleWeb\UserController@redEnvelope']);
        Route::get('mobile/mycenter/redenvelope/history','ConsoleWeb\UserController@redEnvelopeHistoric');
        Route::post('console/user/red/envelope/agentratio/update', ['as'=>'userRedEnvelope:edit','uses'=>'ConsoleWeb\UserController@updateRedEnvelopeAgentRatio']);
        Route::get('console/user/banner/list', ['as'=>'bannerManagement', 'uses'=>'ConsoleWeb\UserController@bannerList']);
        Route::get('console/user/banner/add', ['as'=>'bannerManagement:add', 'uses'=>'ConsoleWeb\UserController@getBanner']);
        Route::get('console/user/banner/get', ['as'=>'bannerManagement', 'uses'=>'ConsoleWeb\UserController@getBanner']);
        Route::post('console/user/banner/edit', ['as'=>'bannerManagement:edit', 'uses'=>'ConsoleWeb\UserController@editBanner']);
        Route::post('console/user/banner/delete', ['as'=>'bannerManagement:del', 'uses'=>'ConsoleWeb\UserController@deleteBanner']);
        Route::post('console/user/banner/status/update', ['as'=>'bannerManagement:edit', 'uses'=>'ConsoleWeb\UserController@updateBannerStatus']);
        Route::get('console/user/banner/appstart/list', ['as'=>'appStartManagement', 'uses'=>'ConsoleWeb\UserController@appStartList']);
        Route::get('console/user/banner/appstart/add', ['as'=>'appStartManagement:add', 'uses'=>'ConsoleWeb\UserController@addAppStart']);
        Route::get('console/user/banner/appstart/get', ['as'=>'appStartManagement', 'uses'=>'ConsoleWeb\UserController@getAppStart']);
        Route::post('console/user/banner/appstart/edit', ['as'=>'appStartManagement:edit', 'uses'=>'ConsoleWeb\UserController@editAppStart']);
        Route::post('console/user/banner/appstart/delete', ['as'=>'appStartManagement:del', 'uses'=>'ConsoleWeb\UserController@deleteAppStart']);
        Route::get('console/user/search', ['as'=>'searchManagement', 'uses'=>'ConsoleWeb\UserController@hotSearch']);
        Route::post('console/user/search/hotword/add', ['as'=>'searchManagement', 'uses'=>'ConsoleWeb\UserController@addHotWord']);
        Route::post('console/user/search/hotword/delete', ['as'=>'searchManagement:del', 'uses'=>'ConsoleWeb\UserController@deleteHotWord']);
        Route::post('console/user/search/hotword/sort/update', ['as'=>'searchManagement', 'uses'=>'ConsoleWeb\UserController@updateHotWordSort']);
        Route::get('console/user/search/edit', ['as'=>'searchManagement:edit', 'uses'=>'ConsoleWeb\UserController@setHotSearch']);
        Route::get('console/user/search/export', ['as'=>'searchManagement', 'uses'=>'ConsoleWeb\UserController@exportHotSearch']);
        Route::get('console/user/help', ['as'=>'userHelpManagement', 'uses'=>'ConsoleWeb\UserController@helpCenter']);
        Route::get('console/user/guide', ['as'=>'userHelpManagement', 'uses'=>'ConsoleWeb\UserController@userGuide']);
        Route::get('console/user/feedback/management', ['as'=>'userFeedbackManagement', 'uses'=>'ConsoleWeb\UserController@feedbackManage']);
        Route::get('console/user/feedback/management/export', ['as'=>'userFeedbackManagement', 'uses'=>'ConsoleWeb\UserController@feedbackManageExport']);
        Route::get('console/user/feedback/get', ['as'=>'userFeedbackManagement', 'uses'=>'ConsoleWeb\UserController@feedbackDetailed']);
        Route::post('console/user/feedback/edit', ['as'=>'userFeedbackManagement:edit', 'uses'=>'ConsoleWeb\UserController@editFeedback']);
        Route::get('console/user/message/management', ['as'=>'userMessageManagement', 'uses'=>'ConsoleWeb\UserController@messageManage']);
        Route::get('console/user/message/check', ['as'=>'userMessageManagement', 'uses'=>'ConsoleWeb\UserController@messageCheck']);
        Route::get('console/shop/list', ['as'=>'shopManagement', 'uses'=>'ConsoleWeb\ShopController@shopList']);
        Route::get('console/shop/new', ['as'=>'shopManagement:add', 'uses'=>'ConsoleWeb\ShopController@newShop']);
        Route::post('console/shop/add', ['as'=>'shopManagement:add', 'uses'=>'ConsoleWeb\ShopController@addShop']);
        Route::get('console/shop/get', ['as'=>'shopManagement', 'uses'=>'ConsoleWeb\ShopController@getShop']);
        Route::get('console/shop/qrcode/batch/generate', ['as'=>'shopManagement', 'uses'=>'ConsoleWeb\ShopController@batchQrCode']);
        Route::post('console/shop/qrcode/binding', ['as'=>'shopManagement', 'uses'=>'ConsoleWeb\ShopController@bindingQrCode']);
        Route::post('console/shop/downshelf', ['as'=>'banShopManagement:edit', 'uses'=>'ConsoleWeb\ShopController@downShelfShop']);
        Route::post('console/shop/upshelf', ['as'=>'banShopManagement:edit', 'uses'=>'ConsoleWeb\ShopController@upShelfShop']);
        Route::post('console/shop/renew', ['as'=>'verifyManagement', 'uses'=>'ConsoleWeb\ShopController@renewShop']);
        Route::post('console/shop/delete', ['as'=>'verifyManagement', 'uses'=>'ConsoleWeb\ShopController@deleteShop']);
        Route::get('console/shop/check', ['as'=>'verifyManagement', 'uses'=>'ConsoleWeb\ShopController@shopCheck']);
        Route::post('console/shop/edit', ['as'=>'shopManagement:edit', 'uses'=>'ConsoleWeb\ShopController@editShop']);
        Route::post('console/shop/parentmobile/update', ['as'=>'shopManagement:edit', 'uses'=>'ConsoleWeb\ShopController@updateShopParentMobile']);
        Route::post('console/shop/maintainer/update', ['as'=>'shopManagement:edit', 'uses'=>'ConsoleWeb\ShopController@updateShopMaintainer']);
        //已上架商家详情修改级别 TODO 等待添加权限
        Route::post('console/shop/grade/update', 'ConsoleWeb\ShopController@updateShopGrade');

        Route::get('console/shop/waitlist', ['as'=>'staffVerifyManagement', 'uses'=>'ConsoleWeb\ShopController@shopWaitList']);
        Route::get('console/shop/review/get', ['as'=>'shopManagement', 'uses'=>'ConsoleWeb\ShopController@getShopReview']);
        Route::get('console/shop/review/check', ['as'=>'shopManagement', 'uses'=>'ConsoleWeb\ShopController@shopReviewCheck']);
        Route::post('console/shop/review/businesspeople/edit', ['as'=>'staffVerifyManagement:edit', 'uses'=>'ConsoleWeb\ShopController@editBusinessPeopleShopReview']);
        Route::post('console/shop/review/businesspeople/submit', ['as'=>'staffVerifyManagement:edit', 'uses'=>'ConsoleWeb\ShopController@submitShopReviewByBusinessPeople']);
        Route::post('console/shop/review/customer/submit', ['as'=>'verifyManagement:edit', 'uses'=>'ConsoleWeb\ShopController@submitShopReviewByCustomer']);
        Route::post('console/shop/review/customer/delete', ['as'=>'verifyManagement:del', 'uses'=>'ConsoleWeb\ShopController@deleteShopReviewByCustomer']);
        Route::post('console/shop/event/today/update', ['as'=>'verifyManagement', 'uses'=>'ConsoleWeb\ShopController@updateShopTodayEvent']);
        Route::get('console/shop/custom/waitlist', ['as'=>'verifyManagement', 'uses'=>'ConsoleWeb\ShopController@customWaitList']);
        Route::post('console/shop/review/customer/edit', ['as'=>'verifyManagement:edit', 'uses'=>'ConsoleWeb\ShopController@editCustomerShopReview']);
        Route::get('console/shop/downshelf/list', ['as'=>'banShopManagement', 'uses'=>'ConsoleWeb\ShopController@shopDownShelfList']);
        Route::get('console/shop/status/list', ['as'=>'shopStatus', 'uses'=>'ConsoleWeb\ShopController@shopStatusList']);
        Route::get('console/shop/lastevent/list', ['as'=>'shopStatus', 'uses'=>'ConsoleWeb\ShopController@shopLastEventList']);
        Route::get('console/shop/lastevent/export', ['as'=>'shopStatus', 'uses'=>'ConsoleWeb\ShopController@exportShopLastEventList']);
        Route::get('console/shop/withoutevent/list',  ['as'=>'shopStatus', 'uses'=>'ConsoleWeb\ShopController@shopWithoutEventList']);
        Route::get('console/shop/withoutevent/export',  ['as'=>'shopStatus', 'uses'=>'ConsoleWeb\ShopController@exportshopWithoutEventList']);
        Route::get('console/shop/code/manage', 'ConsoleWeb\ShopController@shopCodeManage');
        Route::get('console/shop/daily/record', ['as'=>'shopStatus', 'uses'=>'ConsoleWeb\ShopController@dailyRecord']);
        Route::get('console/shop/doubleday/choose', ['as'=>'doubleDayManagement', 'uses'=>'ConsoleWeb\ShopController@doubledayChoose']);
        Route::get('console/shop/doubleday/get', ['as'=>'doubleDayManagement', 'uses'=>'ConsoleWeb\ShopController@doubledayDetails']);
        Route::get('console/shop/doubleday/export', ['as'=>'doubleDayManagement:export', 'uses'=>'ConsoleWeb\ShopController@exportDoubleDay']);
        Route::get('console/shop/night/management', ['as'=>'nightShopManagement', 'uses'=>'ConsoleWeb\ShopController@nightManage']);
        Route::post('console/shop/night/forbid/update', ['as'=>'doubleDayManagement', 'uses'=>'ConsoleWeb\ShopController@updateShopForbidNightEvent']);
        Route::get('console/shop/night/get', ['as'=>'nightShopManagement', 'uses'=>'ConsoleWeb\ShopController@nightDetails']);
        Route::get('console/shop/help', ['as'=>'shopHelpManagement', 'uses'=>'ConsoleWeb\ShopController@shopHelp']);
        Route::get('console/shop/feedback/manage', ['as'=>'shopFeedbackManagement', 'uses'=>'ConsoleWeb\ShopController@shopFeedbackManage']);
        Route::get('console/shop/feedback/manage/export', ['as'=>'shopFeedbackManagement', 'uses'=>'ConsoleWeb\ShopController@shopFeedbackManageExport']);
        Route::get('console/shop/feedback/get', ['as'=>'shopFeedbackManagement', 'uses'=>'ConsoleWeb\ShopController@shopFeedbackDetailed']);
        Route::post('console/shop/feedback/edit', ['as'=>'shopFeedbackManagement:edit', 'uses'=>'ConsoleWeb\ShopController@editShopFeedback']);
        Route::get('console/shop/message/manage', ['as'=>'shopMessageManagement', 'uses'=>'ConsoleWeb\ShopController@shopMessageManage']);
        Route::get('console/shop/message/check', ['as'=>'shopMessageManagement', 'uses'=>'ConsoleWeb\ShopController@shopMessageCheck']);
        Route::get('console/shop/joinin', ['as'=>'shopFeedbackManagement', 'uses'=>'ConsoleWeb\ShopController@shopJoinIn']);
        Route::get('console/order/recharge/list', ['as'=>'rechargeManagement', 'uses'=>'ConsoleWeb\OrderController@rechargeList']);
        Route::get('console/order/recharge/refund/list', ['as'=>'refundManagement', 'uses'=>'ConsoleWeb\OrderController@rechargeRefundList']);
        Route::get('console/order/recharge/refund/list/export',['as'=>'refundManagement', 'uses'=>'ConsoleWeb\OrderController@rechargeRefundListExport']);
        Route::get('console/order/order/refund/list', ['as'=>'refundManagement', 'uses'=>'ConsoleWeb\OrderController@orderRefundList']);
        Route::get('console/order/order/refund/list/export', ['as'=>'refundManagement', 'uses'=>'ConsoleWeb\OrderController@orderRefundListExport']);
        Route::get('console/order/recharge/export', ['as'=>'rechargeManagement:export', 'uses'=>'ConsoleWeb\OrderController@exportRechargeList']);
        Route::get('console/order/recharge/doublestatus/update', ['as'=>'rechargeManagement:edit', 'uses'=>'ConsoleWeb\OrderController@updateRechargeDoubleStatus']);
        Route::get('console/order/recharge/get', ['as'=>'rechargeManagement', 'uses'=>'ConsoleWeb\OrderController@getRechargeDetail']);
        Route::get('console/order/consume/list', ['as'=>'orderManagement', 'uses'=>'ConsoleWeb\OrderController@consumeList']);
        Route::get('console/order/consume/export', ['as'=>'orderManagement:export', 'uses'=>'ConsoleWeb\OrderController@exportConsumeList']);
        Route::get('console/order/consume/details', ['as'=>'orderManagement', 'uses'=>'ConsoleWeb\OrderController@consumeDetails']);
        Route::get('console/order/consume/refund/getmoney', ['as'=>'orderManagement', 'uses'=>'ConsoleWeb\OrderController@getMoneyAfterOrderRefund']);
        Route::post('console/order/consume/refund/submit', ['as'=>'orderManagement', 'uses'=>'ConsoleWeb\OrderController@submitOrderRefundData']);
        Route::get('console/order/comment/list', ['as'=>'commentManagement', 'uses'=>'ConsoleWeb\OrderController@commentList']);
        Route::post('console/order/comment/delete', ['as'=>'commentManagement:del', 'uses'=>'ConsoleWeb\OrderController@deleteComment']);
        Route::get('console/order/report/list', ['as'=>'reportManagement', 'uses'=>'ConsoleWeb\OrderController@reportList']);
        Route::post('console/order/report/status/handle', ['as'=>'reportManagement', 'uses'=>'ConsoleWeb\OrderController@handleReportStatus']);
        Route::get('console/order/business/review', ['as'=>'shopCommentManagement', 'uses'=>'ConsoleWeb\OrderController@businessReview']);
        Route::post('console/order/business/review/delete', ['as'=>'shopCommentManagement', 'uses'=>'ConsoleWeb\OrderController@deleteBusinessReview']);
        Route::get('console/finance/rechargelist/getbymobile', 'ConsoleWeb\FinanceController@getRechargeByMobile');
        Route::post('console/finance/platform/refund', ['as'=>'ledgerAccount', 'uses'=>'ConsoleWeb\FinanceController@refund']);
        Route::get('console/finance/platform/money', ['as'=>'ledgerAccount', 'uses'=>'ConsoleWeb\FinanceController@platformMoney']);
        Route::post('console/finance/recharge/money', ['as'=>'ledgerAccount', 'uses'=>'ConsoleWeb\FinanceController@rechargeMoney']);
        Route::get('console/finance/user/statement', ['as'=>'userStatement', 'uses'=>'ConsoleWeb\FinanceController@userStatement']);
        Route::get('console/finance/user/statement/export', ['as'=>'userStatement:export', 'uses'=>'ConsoleWeb\FinanceController@exportUserStatement']);
        Route::get('console/finance/recharge/get', ['as'=>'userStatement', 'uses'=>'ConsoleWeb\FinanceController@rechargeDetails']);
        Route::get('console/finance/consume/get', ['as'=>'userStatement', 'uses'=>'ConsoleWeb\FinanceController@financeConsumeDetails']);
        Route::get('console/finance/business/statement', ['as'=>'shopStatement', 'uses'=>'ConsoleWeb\FinanceController@businessStatement']);
        Route::get('console/finance/receivable/manage', ['as'=>'shopStatement','uses'=>'ConsoleWeb\FinanceController@receivableManage']);
        Route::get('console/finance/receivable/check', ['as'=>'shopStatement','uses'=>'ConsoleWeb\FinanceController@receivableCheck']);
        Route::post('console/finance/receivable/update', ['as'=>'shopStatement','uses'=>'ConsoleWeb\FinanceController@updateReceivable']);
        Route::get('console/finance/business/statement/export', ['as'=>'shopStatement:export', 'uses'=>'ConsoleWeb\FinanceController@exportBusinessStatement']);
        Route::get('console/finance/business/statement/get', ['as'=>'shopStatement', 'uses'=>'ConsoleWeb\FinanceController@businessStatementDetails']);
        Route::get('console/finance/waitmoney/list', ['as'=>'waitWithdraw', 'uses'=>'ConsoleWeb\FinanceController@waitMoneyList']);
        Route::post('console/finance/waitmoney/remit', ['as'=>'waitWithdraw', 'uses'=>'ConsoleWeb\FinanceController@waitMoneyRemit']);
        Route::post('console/finance/waitmoney/status/refresh', ['as'=>'waitWithdraw', 'uses'=>'ConsoleWeb\FinanceController@refreshWithdrawStatus']);
        Route::get('console/finance/waitmoney/export', ['as'=>'waitWithdraw:export', 'uses'=>'ConsoleWeb\FinanceController@exportWaitMoney']);
        Route::get('console/finance/gotmoney/list', ['as'=>'alreadyWithdraw', 'uses'=>'ConsoleWeb\FinanceController@gotmoneyList']);
        Route::get('console/finance/gotmoney/export', ['as'=>'alreadyWithdraw:export', 'uses'=>'ConsoleWeb\FinanceController@exportGotMoneyList']);
        Route::get('console/finance/month/list', ['as'=>'commission', 'uses'=>'ConsoleWeb\FinanceController@monthList']);
        Route::get('console/finance/month/get', ['as'=>'commission', 'uses'=>'ConsoleWeb\FinanceController@monthListdetails']);
        Route::get('console/finance/salesman/statement/index', ['as'=>'shopSalesmanStatement', 'uses'=>'ConsoleWeb\FinanceController@salesmanStatementIndex']);
        Route::get('console/finance/salesman/waitwithdrawal/index', ['as'=>'shopSalesmanWaitWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@salesmanWaitWithdrawalIndex']);
        Route::get('console/finance/salesman/withdrawal/index', ['as'=>'shopSalesmanWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@salesmanWithdrawalIndex']);
        Route::get('console/finance/salesman/statement/export', ['as'=>'shopSalesmanStatement', 'uses'=>'ConsoleWeb\FinanceController@exportSalesmanStatement']);
        Route::get('console/finance/salesman/waitwithdrawal/export', ['as'=>'shopSalesmanWaitWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@exportSalesmanWaitWithdrawal']);
        Route::get('console/finance/salesman/withdrawal/export', ['as'=>'shopSalesmanWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@exportSalesmanWithdrawal']);
        Route::post('console/finance/salesman/shop/remit', ['as'=>'shopSalesmanWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@remitSalesmanShop']);
        Route::post('console/finance/salesman/user/remit', ['as'=>'shopSalesmanWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@remitSalesmanUser']);
        Route::get('console/finance/agent/profit', ['as'=>'agentProfit', 'uses'=>'ConsoleWeb\FinanceController@agentProfit']);
        Route::get('console/finance/agent/profit/bymonth', ['as'=>'agentProfit', 'uses'=>'ConsoleWeb\FinanceController@agentProfitByMonth']);
        Route::get('console/finance/agent/profit/export', ['as'=>'agentProfit', 'uses'=>'ConsoleWeb\FinanceController@exportAgentProfit']);
        Route::get('console/finance/agent/profit/bymonth/export', ['as'=>'agentProfit', 'uses'=>'ConsoleWeb\FinanceController@exportAgentProfitByMonth']);
        Route::get('console/finance/agent/statement', ['as'=>'agentStatement', 'uses'=>'ConsoleWeb\FinanceController@agentStatement']);
        Route::get('console/finance/agent/statement/export', ['as'=>'agentStatement', 'uses'=>'ConsoleWeb\FinanceController@exportAgentStatement']);
        Route::get('console/finance/agent/statement/details', ['as'=>'agentStatement', 'uses'=>'ConsoleWeb\FinanceController@agentStatementDetails']);
        Route::get('console/finance/agent/statement/details/export', ['as'=>'agentStatement', 'uses'=>'ConsoleWeb\FinanceController@exportAgentStatementDetails']);
        Route::get('console/finance/agent/shopwaitwithdrawal', ['as'=>'agentWaitWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@agentShopWaitWithdrawal']);
        Route::post('console/finance/agent/shopwaitwithdrawal/remit', ['as'=>'agentStatement', 'uses'=>'ConsoleWeb\FinanceController@agentShopWaitWithdrawalRemit']);
        Route::get('console/finance/agent/shopwaitwithdrawal/collectionAccount/export',['as'=>'agentStatement', 'uses'=>'ConsoleWeb\FinanceController@exportAgentCollectionAccountWithdrawal']);
        Route::get('console/finance/agent/shopwithdrawal', ['as'=>'agentWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@agentShopWithdrawal']);
        Route::get('console/finance/agent/shopwaitwithdrawal/export', ['as'=>'agentWaitWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@exportAgentShopWaitWithdrawal']);
        Route::get('console/finance/agent/shopwithdrawal/export', ['as'=>'agentWithdrawal', 'uses'=>'ConsoleWeb\FinanceController@exportAgentShopWithdrawal']);
        Route::get('console/finance/agent/receivable/manage', ['as'=>'agentReceivableManage', 'uses'=>'ConsoleWeb\FinanceController@agentReceivableManage']);
        Route::post('console/finance/agent/receivable/manage/edit',['as'=>'agentReceivableManage', 'uses'=>'ConsoleWeb\FinanceController@agentReceivableManageEdit']);
        Route::get('console/salesman/shop/lists', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@shopLists']);
        Route::get('console/salesman/shop/search',['as'=>'shopSalesmanManagement', 'uses'=> 'ConsoleWeb\SalesmanController@searchShop']);
        Route::post('console/salesman/shop/add', ['as'=>'shopSalesmanManagement:add', 'uses'=>'ConsoleWeb\SalesmanController@addShopSalesman']);
        Route::get('console/salesman/shop/get', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@shopGet']);
        Route::post('console/salesman/shop/status/update', ['as'=>'shopSalesmanManagement:edit', 'uses'=>'ConsoleWeb\SalesmanController@updateShopSalesmanStatus']);
        Route::post('console/salesman/shop/upgrade', ['as'=>'shopSalesmanManagement:edit', 'uses'=>'ConsoleWeb\SalesmanController@upgradeShopSalesman']);
        Route::get('console/salesman/shop/register/lists', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@shopRegisterLists']);
        Route::get('console/salesman/shop/register/export', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@exportShopRegisterLists']);
        Route::get('console/salesman/shop/order/lists', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@shopOrderLists']);
        Route::get('console/salesman/shop/order/export', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@exportShopOrderLists']);
        Route::get('console/salesman/shop/withdrawal/lists', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@shopWithdrawalLists']);
        Route::get('console/salesman/setup', ['as'=>'salesmanSetManagement', 'uses'=>'ConsoleWeb\SalesmanController@salesmanSetup']);
        Route::post('console/salesmanset/update', ['as'=>'salesmanSetManagement', 'uses'=>'ConsoleWeb\SalesmanController@updateSalesmanSet']);
        Route::get('console/salesmanset/user/new', 'ConsoleWeb\SalesmanController@userSalesmanNew');
        Route::get('console/salesmanset/user/details', 'ConsoleWeb\SalesmanController@salesmanDetails');
        Route::get('console/salesman/setup/history', ['as'=>'salesmanSetManagement', 'uses'=>'ConsoleWeb\SalesmanController@salesmanSetupHistoric']);
        Route::get('console/salesman/user/list', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@userSalesmanList']);
        Route::post('console/salesman/user/add', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@addUserSalesman']);
        Route::get('console/salesman/user/details', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@userSalesmanDetails']);
        Route::get('console/salesman/user/result', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@userSalesmanResult']);
        Route::post('console/salesman/user/salesmanset/update', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@updateSingleUserSalesmanSet']);
        Route::get('console/salesman/user/qrcode/batch/generate', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@batchGenerateUserSalesmanQrCode']);
        Route::post('console/salesman/user/qrcode/binding', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@bindingUserSalesmanQrCode']);
        Route::get('console/salesman/user/registerororder/get', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@getUseSalesmanRegisterOrOrder']);
        Route::post('console/salesman/user/status/update', ['as'=>'userSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@updateUserSalesmanStatus']);
        Route::get('console/salesman/person/order/lists', ['as'=>'shopSalesmanManagement', 'uses'=>'ConsoleWeb\SalesmanController@personSalesmanOrderListsByType']);
        Route::get('console/shop/bigpicture', 'ConsoleWeb\ShopController@bigPicture');
        Route::get('console/statistical/survey', ['as'=>'statistical', 'uses'=>'ConsoleWeb\StatisticsController@statisticalSurvey']);
        Route::get('console/statistical/chart', ['as'=>'statistical', 'uses'=>'ConsoleWeb\StatisticsController@getChartData']);
        Route::get('console/statistical/order/class/list', ['as'=>'statistical', 'uses'=>'ConsoleWeb\StatisticsController@orderListByClassId']);
        Route::get('console/statistical/order/class/export', ['as'=>'statistical', 'uses'=>'ConsoleWeb\StatisticsController@exportOrderListByClassId']);
        Route::get('console/statistical/order/shop/list', ['as'=>'statistical', 'uses'=>'ConsoleWeb\StatisticsController@orderListByShop']);
        Route::get('console/statistical/order/shop/export', ['as'=>'statistical', 'uses'=>'ConsoleWeb\StatisticsController@exportOrderListByShop']);
        Route::get('console/show/user','ConsoleWeb\FindUsersController@byUserMobileFindUserInfo');
    });
});

//API专用
$api = app('Dingo\Api\Routing\Router');
$api->version('v2', function ($api) {
    $api->group($GLOBALS['userapi'], function ($api) {
        //不需要进行认证的API
        $api->get('startpage','Common\CommonController@appStartPage');
        $api->get('index/banner','Today\TodayController@indexBanner');
        $api->get('index/shop','Today\TodayController@indexShop');
        $api->get('city/get','Common\CommonController@getAllOpenedCities');
        $api->get('district/get','Common\CommonController@getDistrictAndBusinessArea');
        $api->get('class/get', 'Common\CommonController@getClass');
        $api->get('class/night/get', 'Common\CommonController@getNightEventClass');
        $api->get('shop/list', 'Today\TodayController@shopLists');
        $api->get('shop/get', 'Today\TodayController@shopDetail');
        $api->get('shop/event/get', 'Today\TodayController@getShopEvent');
        $api->get('shop/search', 'Today\TodayController@searchShop');
        $api->get('search/word/get', 'Today\TodayController@getSearchWords');
        $api->get('shop/comment/list', 'Today\TodayController@shopCommentList');
        $api->get('andriod/version', 'Common\CommonController@androidVersion');
        $api->get('ios/version', 'Common\CommonController@iosVersion');
        $api->get('mycenter/shop/joinin', 'MyCenter\MyCenterController@shopJoinIn');
        $api->get('recharge/platform/get', 'Wallet\WalletController@selectRechargePlatform');
        $api->get('wallet/doublecoupon/get','Wallet\WalletController@newUserDoubleCoupon');//TODO ios出问题 测试
        
        $api->group(['middleware'=>'validatorsign'],function($api){
        //需要签名认证的API
            $api->post('auth/refreshtoken','Auth\AuthController@refreshToken');
            $api->post('auth/getcode','Auth\AuthController@getCode');
            $api->post('auth/verifycode','Auth\AuthController@verifyCode');
            $api->post('auth/isfirstlogin','Auth\AuthController@isFirstLogin');
            $api->post('auth/login','Auth\AuthController@registerOrLogin');
            $api->post('auth/third/login','Auth\AuthController@thirdLogin');

            $api->group(['middleware'=>'apiauth'],function($api){
            //需要token认证以及签名认证的API
                $api->post('oss/get','Common\CommonController@getStsOssAuth');
                $api->post('user/get','MyCenter\MyCenterController@getUser');
                $api->post('salesman/batch', 'Auth\AuthController@batchSalesmanQrCodeAfterTwoHourRegister');
                $api->post('shop/comment/add','Today\TodayController@addComment');
                $api->post('auth/logout','Auth\AuthController@logout');
                $api->post('wallet/index','Wallet\WalletController@index');
                $api->post('wallet/order/list','Wallet\WalletController@orderList');
                $api->post('wallet/order/get','Wallet\WalletController@orderDetail');
                $api->post('wallet/recharge/list','Wallet\WalletController@rechargeList');
                $api->post('wallet/recharge/get','Wallet\WalletController@rechargeDetail');
                $api->post('wallet/recharge/ready','Wallet\WalletController@apiReadyRecharge');
                $api->post('wallet/recharge/share/update','Wallet\WalletController@updateRechargeDoubleTimeAfterShare');
                //$api->get('wallet/doublecoupon/get','Wallet\WalletController@newUserDoubleCoupon');
                $api->post('wallet/redenvelope/maxamount/get','Wallet\WalletController@getRedEnvelopeMaxAmountBeforeOrder');
                $api->post('wallet/paycode/get','Wallet\WalletController@getPayCode');
                $api->post('wallet/paystatus/get','Wallet\WalletController@getPayStatus');
                $api->get('wallet/course', 'Wallet\WalletController@course');
                $api->post('mycenter/index', 'MyCenter\MyCenterController@index');
                $api->post('mycenter/user/info', 'MyCenter\MyCenterController@getUserInfo');
                $api->post('mycenter/user/edit', 'MyCenter\MyCenterController@editUserInfo');
                $api->post('mycenter/user/avatar/edit', 'MyCenter\MyCenterController@editUserAvatar');
                $api->get('mycenter/recommend', 'MyCenter\MyCenterController@recommend');
                $api->post('mycenter/doublecoupon/list', 'MyCenter\MyCenterController@doubleCouponList');
                $api->post('mycenter/redenvelope/list', 'MyCenter\MyCenterController@redEnvelopesList');
                $api->post('mycenter/integral/list', 'MyCenter\MyCenterController@integralList');
                $api->post('mycenter/collection/list', 'MyCenter\MyCenterController@collectionList');
                $api->post('mycenter/collection/update', 'MyCenter\MyCenterController@updateCollection');
                $api->post('mycenter/collection/add', 'MyCenter\MyCenterController@addCollection');
                $api->post('mycenter/collection/delete', 'MyCenter\MyCenterController@deleteCollection');
                $api->post('mycenter/subscription/list', 'MyCenter\MyCenterController@subscriptionList');
                $api->post('mycenter/subscription/update', 'MyCenter\MyCenterController@updateSubscription');
                $api->post('mycenter/subscription/add', 'MyCenter\MyCenterController@addSubscription');
                $api->post('mycenter/subscription/delete', 'MyCenter\MyCenterController@deleteSubscription');
                $api->post('mycenter/identity/get', 'MyCenter\MyCenterController@getIdentity');
                $api->post('mycenter/identity/validate', 'MyCenter\MyCenterController@saveIdentity');
                $api->post('mycenter/identity/istrue', 'MyCenter\MyCenterController@verifyIdentity');
                $api->post('mycenter/mobile/update', 'MyCenter\MyCenterController@updateMobile');
                $api->post('mycenter/paypassword/set', 'MyCenter\MyCenterController@setPayPassword');
                $api->post('mycenter/paypassword/verify', 'MyCenter\MyCenterController@verifyPayPassword');
                $api->post('mycenter/paypassword/delete', 'MyCenter\MyCenterController@deletePayPassword');
                $api->post('mycenter/paypassword/reset', 'MyCenter\MyCenterController@resetPayPassword');
                $api->post('mycenter/salesman/index', 'MyCenter\MyCenterController@mySalesmanIndex');
                $api->post('mycenter/salesman/register/list', 'MyCenter\MyCenterController@salesmanRegisterList');
                $api->post('mycenter/salesman/order/list', 'MyCenter\MyCenterController@salesmanOrderList');
                $api->post('mycenter/salesman/recharge/list', 'MyCenter\MyCenterController@salesmanRechargeList');
                $api->post('mycenter/salesman/withdrawal/index', 'MyCenter\MyCenterController@salesmanWithdrawal');
                $api->post('mycenter/salesman/withdrawal/detail/getbyday', 'MyCenter\MyCenterController@salesmanWithdrawalDetailByDay');
                $api->post('mycenter/salesman/balance', 'MyCenter\MyCenterController@salesmanBalance');
                $api->post('qrcode/shop/collectmoney', 'QrCode\QrCodeController@payByShopQrCode');
                $api->post('qrcode/shop/get', 'QrCode\QrCodeController@getShopByShopId');
                $api->post('auth/userinfo','Auth\AuthController@userInfo');
                $api->post('mycenter/feedback', 'Common\CommonController@feedback');
                $api->post('extension/qrcode/get', 'Common\CommonController@getExtensionQrcode');
                $api->post('redenvelope/get', 'RedEnvelope\RedEnvelopeController@getEnvelope');
            });
        });
    });
});

//app商家版
$api->version('v2', function ($api) {
    $api->group($GLOBALS['shopapi'], function ($api) {
        //不需要签名认证的API
        $api->get('andriod/version', 'Common\CommonController@androidVersion');
        $api->get('ios/version', 'Common\CommonController@iOSVersion');
        $api->group(['middleware'=>'validatorsign'],function($api) {
            //需要签名认证的API
            $api->post('auth/code/get', 'Auth\AuthController@getCode');
            $api->post('auth/login', 'Auth\AuthController@login');
            $api->post('auth/token/refresh', 'Auth\AuthController@refreshToken');
            $api->group(['middleware' => 'shopapiauth'], function ($api) {
                //需要token认证以及签名认证的API
                $api->post('auth/logout', 'Auth\AuthController@logout');
                $api->post('shop/get', 'Common\CommonController@getShop');
                $api->post('auth/get', 'Common\CommonController@getAuth');
                $api->post('index', 'Common\CommonController@index');
                $api->post('bankcard/get', 'Common\CommonController@getBankCard');
                $api->post('collectmoney', ['as' => 'Account', 'uses' => 'CollectMoney\CollectMoneyController@collectMoney']);
                $api->post('iscollectmoney', ['as' => 'Account', 'uses' => 'CollectMoney\CollectMoneyController@isCollectMoney']);
                $api->post('doublecalendar/set', ['as' => 'DoubleCalendar', 'uses' => 'DoubleCalendar\DoubleCalendarController@setDoubleCalendar']);
                $api->post('doublecalendar/get', 'DoubleCalendar\DoubleCalendarController@getDoubleCalendar');
                $api->post('night/set', ['as' => 'DoubleCalendar', 'uses' => 'DoubleCalendar\DoubleCalendarController@setNightEvent']);
                $api->post('order/list', ['as' => 'OrderManager', 'uses' => 'OrderManager\OrderManagerController@orderList']);
                $api->post('order/get', 'OrderManager\OrderManagerController@orderDetail');
                $api->post('comment/list', ['as' => 'CommentManager', 'uses' => 'CommentManager\CommentManagerController@commentList']);
                $api->post('comment/reply', ['as' => 'CommentManager', 'uses' => 'CommentManager\CommentManagerController@replyComment']);
                $api->post('comment/report/add', ['as' => 'CommentManager', 'uses' => 'CommentManager\CommentManagerController@reportComment']);
                $api->post('comment/report/list', ['as' => 'CommentManager', 'uses' => 'CommentManager\CommentManagerController@reportList']);
                $api->post('account/index', ['as' => 'CollectMoney', 'uses' => 'Account\AccountController@index']);
                $api->post('account/wait/list', ['as' => 'CollectMoney', 'uses' => 'Account\AccountController@waitList']);
                $api->post('account/receipt/list', ['as' => 'CollectMoney', 'uses' => 'Account\AccountController@receiptList']);
                $api->post('account/order/date/list', ['as' => 'CollectMoney', 'uses' => 'Account\AccountController@orderListByDate']);
                $api->post('account/order/get', ['as' => 'CollectMoney', 'uses' => 'Account\AccountController@orderDetail']);
                $api->post('account/salesman/index', ['as' => 'CollectMoney', 'uses'=>'Account\AccountController@salesmanIndex']);
                $api->post('account/salesman/paymethod', ['as' => 'CollectMoney', 'uses'=>'Account\AccountController@salesmanPayMethod']);
                $api->post('account/salesman/waitwithdrawal/list',['as' => 'CollectMoney','uses' => 'Account\AccountController@salesmanWaitWithdrawalList']);
                $api->post('account/salesman/withdrawal/list', ['as' => 'CollectMoney', 'uses' =>'Account\AccountController@salesmanWithdrawalList']);
                $api->post('salesman/registeruser/list', 'SalesmanManager\SalesmanManagerController@registerUserList');
                $api->post('salesman/validorder/list', 'SalesmanManager\SalesmanManagerController@validOrderList');
                $api->post('admin/list', ['as' => 'Admin', 'uses' => 'Admin\AdminController@AdminList']);
                $api->post('admin/add', ['as' => 'Admin', 'uses' => 'Admin\AdminController@addAdmin']);
                $api->post('admin/get', ['as' => 'Admin', 'uses' => 'Admin\AdminController@adminDetail']);
                $api->post('admin/edit', ['as' => 'Admin', 'uses' => 'Admin\AdminController@editAdmin']);
                $api->post('admin/delete', ['as' => 'Admin', 'uses' => 'Admin\AdminController@deleteAdmin']);
                $api->post('mycenter/info', 'Common\CommonController@getUserInfo');
                $api->post('mycenter/password/update', 'Common\CommonController@updateUserPassword');
                $api->post('mycenter/feedback', 'Common\CommonController@feedback');
                $api->post('salesman/index','SalesmanManager\SalesmanManagerController@index');

            });
        });
    });
});
